export default [
  {
    path: '/user',
    layout: false,
    routes: [
      { name: '登录', path: '/user/login', component: './User/Login' },
      { name: '注册', path: '/user/register', component: './User/Register' },
      {
        name: '个人资料',
        path: '/user/profile',
        component: './User/ProfileView',
        hideInMenu: true,
      },
    ],
  },
  { path: '/welcome', name: '欢迎', icon: 'smile', component: './Welcome' },
  { path: '/chat', name: 'AI聊天', icon: 'message', component: './Chat' },
  {
    path: '/chat-sessions',
    name: '聊天记录',
    icon: 'database',
    component: './ChatSessionInfo',
    hideInMenu: true,
  },

  // 个人资料相关路由
  {
    path: '/profile',
    name: '个人资料',
    icon: 'user',
    component: './User/ProfileView',
    hideInMenu: true,
    breadcrumbName: null,
  },
  {
    path: '/profile/edit',
    name: '修改个人资料',
    component: './User/Profile',
    hideInMenu: true,
    breadcrumbName: null,
  },

  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/users' },
      { path: '/admin/users', name: '用户管理', component: './Admin/UserManagement' },
    ],
  },
  { path: '/', redirect: '/welcome' },
  { path: '*', layout: false, component: './404' },
];
